<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../lib/bootstrap-3.3.5-dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="../css/caidanlan.css">
  <link rel="stylesheet" href="../font/iconfont.css">
  <link rel="stylesheet" href="../css/book_inventory.css">
  <script src="../lib/bootstrap-3.3.5-dist/js/jquery-1.11.3.js"></script>
  <script src="../lib/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
  <script src="../javaScript/data_management.js"></script>
  <script src="../javaScript/utl.js"></script>
  <script src="../javaScript/quanxianpanduan.js"></script>
</head>

<body>
  <div class="container-fulid">
    <div class="row shouhang">
      <span class="iconfont icon-ziliaoku"></span>
      <p>图书馆后台管理系统</p>
      <div id='yonghu'>
      </div>
    </div>
    <div class="row">
      <div class="col-md-2 caidan">
        <a href="../html/jueseguanli.html">
          <p> 角色管理</p>
        </a>
        <a href="../html/guanliyuanguanli.html">
          <p>管理员管理</p>
        </a>
        <a href="./quanxianguanli.html">
          <p>权限管理</p>
        </a>
        <a href="../html/ReaderUser.html">
          <p>读者用户</p>
        </a>
        <a href="../html/duzhejuese.html">
          <p>读者角色</p>
        </a>
        <a href="../html/yuedu.html">
          <p>借阅查询</p>
        </a>
        <a href="../html/jieyueguanli.html">
          <p>借阅管理</p>
        </a>
        <a href="../html/book-management.html">
          <p>书刊管理</p>
        </a>
        <a href="../html/guancangdizhi.html">
          <p>馆藏地址管理</p>
        </a>
        <a href="../html/guancangfenlei.html">
          <p>馆藏分类管理</p>
        </a>
        <a href="../html/cengjiaLabel.html">
          <p>层架标签配置</p>
        </a>
        <a href="../html/fenguanshezhi.html">
          <p>分馆配置</p>
        </a>
        <a href="../html/book_inventory.html">
          <p>图书盘点</p>
        </a>
        <a href="../html/dindanguanli.html">
          <p>订单管理</p>
        </a>
        <a href="../html/tushuguanshezi.html">
          <p>图书馆设置</p>
        </a>
      </div>
      <div class="col-md-9 header">
        <div>
          <span>首页</span>
          <span id="adrs"> > </span>
          <span>图书盘点</span>
        </div>
        <div class="row" id="book">
          <div class="col-md-2">
            <span>书籍数量：</span>
            <span class="zero" id="cor1">0</span>
          </div>
          <div class="col-md-2">
            <span>已盘点数量：</span>
            <span class="zero" id="cor2">0</span>
          </div>
          <div class="col-md-2">
            <span>未盘点数量：</span>
            <span class="zero" id="cor3">0</span>
          </div>
          <div class="col-md-6">
            <div id="check">
              <span>请选择需要盘点的内容</span>
              <span id="done">选择完成</span>
            </div>
          </div>
        </div>

        <div id="md">
          <div class="row">
            <div class="col-md-2" id="turn1">
              <div class="ceng">
                馆藏地址
              </div>
            </div>
            <div class="col-md-2">
              <div class="ceng" id="turn2">
                书籍单册
              </div>
            </div>
            <div class="col-md-2" id="turn3">
              <div class="ceng">
                层架选择
              </div>
            </div>
          </div>

          <div id="one">
            <input type="checkbox" id="allad"><span>所有馆藏地址</span>
          </div>
          <div id="two">
            <input type="checkbox" id="checks"><span>顺义图书馆</span>
          </div>
          <div id="three">
            <input type="checkbox" id="onesite"><span>1号馆</span>
          </div>
          <div id="four">
            <input type="checkbox"><span>楼层-101</span>
          </div>
          <div id="five">
            <input type="checkbox"><span>A-101-55货架</span>
          </div>
          <div id="six">
            <input type="checkbox"><span>2号馆</span>
          </div>
        </div>
      </div>

    </div>
  </div>
  <script src="../javaScript/page_turn.js"></script>

  <script>

    //选择图书馆
    eq = 0
    let sum = 0
    let site1 = 0
    let count
    let all
    function amount() {

      //勾选为true
      $("#checks").click(function () {
        count = $("#checks").prop("checked")
        setData("word", JSON.stringify(Newbook))
        let arr = JSON.parse(getData("word"))
        if (count == true) {
          for (let i = 0; i < arr.length; i++) {
            if (arr[i].site == "顺义图书馆") {
              sum++
              choose()
            }
          }
        }
      })
    }
    amount()
    function choose() {
      $("#done").click(function () {
        $("#cor2").html(sum)
      })
    }
    //所有藏馆
    function Allcheck() {
      $("#allad").click(function () {
        all = $("#allad").prop("checked")
        setData("word", JSON.stringify(Newbook))
        let arr = JSON.parse(getData("word"))
        if (all == true) {
          eq = arr.length
          chooseAll()
        }
      })
    }
    Allcheck()

    function chooseAll() {
      $("#done").click(function () {
        $("#cor1").html(eq)
      })
    }

    //判断 
    function judge() {
      if (count == true) {
        choose()

      }
    }

    //1号馆
    function onesite() {
      let one
      $("#onesite").click(function () {
        one = $("#onesite").prop("checked")
        setData("word", JSON.stringify(Newbook))
        let arr = JSON.parse(getData("word"))
        if (one == true) {
          for (let i = 0; i < arr.length; i++) {
            if (arr[i].onesite == "1号馆") {
              site1++
              choose3()
            }
          }
        }
      })
    }

    isLogin()
    yonghu()
    let guanliname = glqx('图书盘点')
    onesite()

    function choose3() {
      $("#done").click(function () {
        $("#cor2").html(site1)
      })
    }
    judge()

    function choose4() {
      $("#done").click(function () {
        if (eq > 0) {
          $("#cor3").html(eq - sum - site1)
        }
      })
    }
    choose4()

  </script>


</body>

</html>